using HomeModule.About;
using HomeModule.Index;
using HomeModule.Shell;
using Microsoft.Practices.Composite.Modularity;
using PrismNavigationFramework.MVVM;
using PrismNavigationFramework.Navigation;

namespace HomeModule
{
    public class InitModule : IModule
    {
        private readonly IViewRegistrationService _viewRegistrationService;
        private readonly IPrismViewLoadingService _viewLoadingService;

        public InitModule(IViewRegistrationService viewRegistrationService, IPrismViewLoadingService viewLoadingService)
        {
            _viewRegistrationService = viewRegistrationService;
            _viewLoadingService = viewLoadingService;
        }

        public void Initialize()
        {
/*            this._viewRegistrationService.RegisterViewAndViewModel<ShellView, ShellViewModel>();
            this._viewRegistrationService.RegisterViewAndViewModel<IndexView, IndexViewModel>();
            this._viewRegistrationService.RegisterViewAndViewModel<AboutView, AboutViewModel>();*/

            this._viewRegistrationService.RegisterViewsAndTheirViewModels();

            this._viewLoadingService.LoadUrlToRegion("/Widgets/CalendarWidget", "WidgetsRegion");
        }
    }
}